
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div>
        <input type="text" y-model="name" placeholder="姓名"/>
        <input type="text" y-model="age" placeholder="年龄"/>
        <input type="text" y-model="gender" placeholder="性别"/>
      </div>
      <div>
        <p>姓名：<span>{{ name }}</span></p>
        <p>年龄：<span>{{ age }}</span></p>
        <p>性别：<span>{{ gender }}</span></p>
      </div>
    </div>
  </body>
  <script src="mvvm.js"></script>
  <script>
    const app = new MVVM('#app', {
      name: '',
      age: 0,
      gender: '男',
    })
  </script>
  </html>